import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: () => import('@/views/Home/Index')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('@/views/User/Register')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/User/Login')
    },
    {
      path: '/oauth/callback',
      name: 'callback',
      component: () => import('@/views/Oauth/CallBack')
    },
    {
      path: '/user/center',
      name: 'user_center',
      component: () => import('@/views/User/UserCenter')
    },
    {
      path: '/user/center/site',
      name: 'user_center_site',
      component: () => import('@/views/User/UserCenterSite')
    },
    {
      path: '/goods/list/',
      name: 'goods_list',
      component: () => import('@/views/Goods/GoodsList'),
    },
    {
      path: '/goods/detail/',
      name: 'goods_detail',
      component: () => import('@/views/Goods/GoodsDetail'),
    },
    {
      path: '/carts/',
      name: 'carts',
      component: () => import('@/views/Cart/Carts'),
    },
    {
      path: '/place_order/',
      name: 'place_order',
      component: () => import('@/views/Orders/PlaceOrder'),
    },
    {
      path: '/order_success/',
      name: 'place_order',
      component: () => import('@/views/Orders/OrderSuccess'),
    },
    {
      path: '/user/center/order/',
      name: 'center_order',
      component: () => import('@/views/User/UserCenterOrder'),
    },
  ],
  mode:'history' /*hash,history*/
})
